// 引入js
import { Decimal } from 'decimal.js'
import calculates from '@/utils/decimal'
import { createApp, onMounted } from 'vue'
import App from './App.vue'
import axios from 'axios'
import vueAxios from 'vue-axios'
import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import Print from 'vue3-print-nb'
import router from './router'
import common from '@/utils/common'
import * as tools from '@/utils/tools'
// import decodeData from '@/utils/decodeData'
import store from '@/store'
import VueUeditorWrap from 'vue-ueditor-wrap'
// 引入css
import 'element-plus/theme-chalk/dark/css-vars.css'
import './assets/css/CssTools.css'
import 'element-plus/dist/index.css'
import 'animate.css'
import 'font-awesome/css/font-awesome.css'

// 注册window属性和方法
window.$Decimals = Decimal
window.$Calc = calculates
window.$Tools = tools
window.$Common = common
// window.$DecodeData = decodeData

const app = createApp(App)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

app.use(ElementPlus)
app.use(Print)
app.use(vueAxios, axios)
app.use(router)
app.use(store)
app.use(VueUeditorWrap)


app.mount('#app')
